<?php
$session=new CHttpSession();
$session->open();
$i=$session['i'];
$p=Profiles::model()->findByPk($data->uid);
$u=Users::model()->findByPk($data->uid);
?>

<tr<?php echo $i%2==1 ? '': ' class="tr1"'; ?>>
    <td align="center" class="td1<?php echo $i%2==1 ? '': ' td2"'; ?>"><a href="/index.php?r=article/title&name=<?php echo $data->title;?>"><?php echo $data->title;?></a></td>
    <td align="center"<?php echo $i%2==1 ? '': ' class="td2"'; ?>><?php echo $data->createtime;?></td>
    <td align="center"<?php echo $i%2==1 ? '': ' class="td2"'; ?>>
        <a href="<?php echo $this->createUrl('manage/index', array('cate'=>$session['cate'], 'iid'=>$session['iid'], 'id'=>$data->aid));?>">编辑</a>
        <!--        |-->
        <!--        <a href="/index.php?r=manage/index&cate=--><?php //echo (isset($session['cid'])&&$session['cid']>0)  ? $session['cid'] : 12;?><!--&id=--><?php //echo $data->aid;?><!--">编辑</a>-->
        |
        <a href="<?php echo $this->createUrl('manage/index', array('cate'=>$session['cate'], 'iid'=>$session['iid'], 'do'=>'delete', 'id'=>$data->aid));?>">删除</a>
    </td>
</tr>

<?php
$session['i']=$i+1;
?>